﻿Imports System.Windows.Data

Namespace MyWP7Brand_VB.Converters
    Public Class VisibilityConverter
        Implements IValueConverter


        Public Function Convert(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.Convert
            If value IsNot Nothing AndAlso TypeOf value Is Boolean Then
                Return If(DirectCast(value, Boolean), Visibility.Visible, Visibility.Collapsed)
            End If
            Return Nothing

        End Function

        Public Function ConvertBack(ByVal value As Object, ByVal targetType As System.Type, ByVal parameter As Object, ByVal culture As System.Globalization.CultureInfo) As Object Implements System.Windows.Data.IValueConverter.ConvertBack
            Throw New NotImplementedException
        End Function
    End Class
End Namespace
